package com.example.app2;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class FindBackPasswordActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_findback_password);
        Button btn_confirm = findViewById(R.id.btn_confirm);
        EditText et_password = findViewById(R.id.et_password);
        btn_confirm.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =new Intent();
                Bundle bundle=new Bundle();
                bundle.putString("password",et_password.getText().toString());
                intent.putExtras(bundle);
                if(intent==null)
                    Log.d("tang", "onClick: intent为null");

                if(bundle==null)
                {
                    Log.d("tang", "onClick: bundle为null");
                }
                setResult(RESULT_OK,intent);
                finish();
            }
        });
    }
}
